namespace IrisGenerator.Dal {
    using System;
    using System.Collections.Generic;
    using System.Data.SqlClient;
    using System.Configuration;
    using System.Data;
    using System.Xml;
    
    
    public partial class ModuleParameter : IDisposable {
        
        private DataAccess _dataAccess;
        
        public ModuleParameter() {
            this._dataAccess = new DataAccess();
        }
        
        public virtual System.Data.DataSet Select_MODULE_PARAMETER_By_MOD_MOD_ID(System.Nullable<System.Guid> MOD_MOD_ID) {
            this._dataAccess.CreateProcedureCommand("sp_Select_MODULE_PARAMETERs_By_MOD_MOD_ID");
            this._dataAccess.AddParameter("MOD_MOD_ID", MOD_MOD_ID, ParameterDirection.Input);
            DataSet value = this._dataAccess.ExecuteDataSet();
            return value;
        }
        
        public virtual System.Data.DataSet Select_MODULE_PARAMETER_By_MOD_ID(System.Nullable<System.Guid> MOD_ID) {
            this._dataAccess.CreateProcedureCommand("sp_Select_MODULE_PARAMETERs_By_MOD_ID");
            this._dataAccess.AddParameter("MOD_ID", MOD_ID, ParameterDirection.Input);
            DataSet value = this._dataAccess.ExecuteDataSet();
            return value;
        }
        
        public virtual System.Data.DataSet Select_MODULE_PARAMETER_By_VAL_TYP_ID(System.Nullable<System.Guid> VAL_TYP_ID) {
            this._dataAccess.CreateProcedureCommand("sp_Select_MODULE_PARAMETER_By_VAL_TYP_ID");
            this._dataAccess.AddParameter("VAL_TYP_ID", VAL_TYP_ID, ParameterDirection.Input);
            DataSet value = this._dataAccess.ExecuteDataSet();
            return value;
        }
        
        public virtual System.Data.DataSet MODULE_PARAMETER_Select_All() {
            this._dataAccess.CreateProcedureCommand("sp_MODULE_PARAMETER_Select_All");
            DataSet value = this._dataAccess.ExecuteDataSet();
            return value;
        }
        
        public virtual System.Data.DataSet MODULE_PARAMETER_Select_One(System.Nullable<System.Guid> MOD_PAR_ID) {
            this._dataAccess.CreateProcedureCommand("sp_MODULE_PARAMETER_Select_One");
            this._dataAccess.AddParameter("MOD_PAR_ID", MOD_PAR_ID, ParameterDirection.Input);
            DataSet value = this._dataAccess.ExecuteDataSet();
            return value;
        }
        
        public virtual System.Nullable<System.Guid> MODULE_PARAMETER_Insert(System.Nullable<System.Guid> VAL_TYP_ID, System.Nullable<System.Guid> MOD_ID, System.Nullable<System.Guid> MOD_MOD_ID, string MOD_PAR_NAME, string MOD_PAR_DESCRIPTION, System.Nullable<bool> MOD_PAR_MANDATORY) {
            this._dataAccess.CreateProcedureCommand("sp_MODULE_PARAMETER_Insert");
            this._dataAccess.AddParameter("VAL_TYP_ID", VAL_TYP_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("MOD_ID", MOD_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("MOD_MOD_ID", MOD_MOD_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("MOD_PAR_NAME", MOD_PAR_NAME, ParameterDirection.Input);
            this._dataAccess.AddParameter("MOD_PAR_DESCRIPTION", MOD_PAR_DESCRIPTION, ParameterDirection.Input);
            this._dataAccess.AddParameter("MOD_PAR_MANDATORY", MOD_PAR_MANDATORY, ParameterDirection.Input);
            Guid value = ((Guid)(this._dataAccess.ExecuteScalar()));
            return value;
        }
        
        public virtual System.Nullable<int> MODULE_PARAMETER_Delete(System.Nullable<System.Guid> MOD_PAR_ID) {
            this._dataAccess.CreateProcedureCommand("sp_MODULE_PARAMETER_Delete");
            this._dataAccess.AddParameter("MOD_PAR_ID", MOD_PAR_ID, ParameterDirection.Input);
            int value = this._dataAccess.ExecuteNonQuery();
            return value;
        }
        
        public virtual System.Nullable<int> MODULE_PARAMETER_Update(System.Nullable<System.Guid> MOD_PAR_ID, System.Nullable<System.Guid> VAL_TYP_ID, System.Nullable<System.Guid> MOD_ID, System.Nullable<System.Guid> MOD_MOD_ID, string MOD_PAR_NAME, string MOD_PAR_DESCRIPTION, System.Nullable<bool> MOD_PAR_MANDATORY) {
            this._dataAccess.CreateProcedureCommand("sp_MODULE_PARAMETER_Update");
            this._dataAccess.AddParameter("MOD_PAR_ID", MOD_PAR_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("VAL_TYP_ID", VAL_TYP_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("MOD_ID", MOD_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("MOD_MOD_ID", MOD_MOD_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("MOD_PAR_NAME", MOD_PAR_NAME, ParameterDirection.Input);
            this._dataAccess.AddParameter("MOD_PAR_DESCRIPTION", MOD_PAR_DESCRIPTION, ParameterDirection.Input);
            this._dataAccess.AddParameter("MOD_PAR_MANDATORY", MOD_PAR_MANDATORY, ParameterDirection.Input);
            int value = this._dataAccess.ExecuteNonQuery();
            return value;
        }

        
        
        public virtual void Dispose() {
            if ((this._dataAccess != null)) {
                this._dataAccess.Dispose();
            }
        }
    }
}
